package com.test.mchelepesa.dialog_rice;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;

import androidx.annotation.NonNull;

import com.test.mchelepesa.R;
import com.test.mchelepesa.constant_rice.Constant_rice;
import com.test.mchelepesa.util_rice.StringUtil_rice;

public class LoadingDialog_rice extends Dialog {


    public LoadingDialog_rice(@NonNull Context context) {
        super(context);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_loading_rice);
        getWindow().setBackgroundDrawableResource(R.color.trans);
        setCancelable(false);
    }

    @Override
    public void show() {
        try {
            super.show();
        }catch (Exception e){
            StringUtil_rice.printException(e);
        }
    }

    @Override
    public void dismiss() {
        try {
            if (!isShowing()) return;
            super.dismiss();
        }catch (Exception e){
            StringUtil_rice.printException(e);
        }
    }

}
